package com.wjh.anyview.websocket.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.socket.config.annotation.EnableWebSocket;
import org.springframework.web.socket.server.standard.ServerEndpointExporter;

/**
 * websocket相关配置类
 *
 * @author wjh
 */
@Configuration
@EnableWebSocket
public class WebSocketConfig {
    /**
     * 注册ServerEndpointExporter对象，该对象用于扫描注解了@ServerEndpoint注解的类
     *
     * @return new ServerEndpointExporter()
     */
    @Bean
    public ServerEndpointExporter serverEndpointExporter() {
        return new ServerEndpointExporter();
    }

}
